﻿
using Microsoft.AspNetCore.Builder;

namespace YDT_ProductService.Registrys
{
    /// <summary>
    /// ConsulApplicationBuilder扩展 
    /// </summary>
    public static class ConsulApplicationBuilderExtenions
    {
        /// <summary>
        /// consul扩展方法
        /// </summary>
        /// <param name="services"></param>
        /// <param name="configuration"></param>
        public static IApplicationBuilder UseDistributedServiceRegistry(this IApplicationBuilder app,
                                    string HealthCheck)
        {
            // 2、注册心跳检测中间件（类似于控制器）
            app.UseHealthChecks(HealthCheck);
            return app;
        }
    }
}
